<?php

namespace App\Models\Observer;

use App\Models\EmailVerification;

class EmailVerificationObserver
{

    /**
     * 监听插入前事件
     *
     * @param EmailVerification $verification
     */
    public function saving(EmailVerification $verification)
    {
        $verification->expired_at = now()->addMinutes(EmailVerification::EXPIRED_MINUTES);
    }
}